module vec_math_test;  implicit none; save;
  public
  contains

function dot_test(min_i, max_i, v, v2); implicit none; 
  integer, intent(in) :: min_i, max_i;
  real, dimension(minI:maxI), intent(in) :: v, v2;
  real :: dot = 0., s = 0.;  
  integer :: i; 
  do i = min_i, max_i;
    s = s + v(i) * v2(i);      
  end do
  dot = s 
end function dot;
end module vec_math_test;
 